home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
AmigActive 10
/
AACD 10.iso
/
AACD
/
Magazine
/
Online
/
httpproxy
/
src
/
net.h
< prev
next >
Wrap
C/C++ Source or Header
|
1996-08-20
|
2KB
|
66 lines
/*(( "Header" */
/*
* $Id: net.h,v 1.2 1996/07/17 16:42:42 mshopf Exp mshopf $
*
* (c) 1995-96 Matthias Hopf
* Network protocol encapsulation for httpproxy.
*/
/*
* $Log: net.h,v $
* Revision 1.2 1996/07/17 16:42:42 mshopf
* added local host name entry.
*
* Revision 1.1 1996/06/03 04:17:23 mshopf
* Initial revision
*
*/
/*)) */
#ifndef _NET_H__
#define _NET_H__
/*(( "Constants" */
#define DEFAULT_HTTPPORT 80
#define MIN_TIMEOUT (1*60) /* Timeouts are checked in this interval at least */
#ifndef FALSE
#define FALSE (0)
#define TRUE (1)
#endif
/*)) */
/*(( "Types" */
typedef struct {
const char *Descr; /* Description */
const char *HostName; /* local hostname (valid after init()) */
int FDSize; /* maximum FD set size (valid after initialisation) */
int StdHttpPort; /* Standard HTTP protocol port (valid after initialisation) */
int (*init) (int);
void (*exit) (void);
int (*select) (void (*)(int, const char *), void (*)(void)); /* wait for incoming / outgoing data */
int (*checkread) (int); /* check read possibility */
int (*checkwrite) (int); /* check read possibility */
int (*read) (int, char *, int);
int (*write) (int, char *, int);
int (*server) (int); /* open listen port */
int (*open) (const char *, int); /* open connection to host */
void (*close) (int); /* -> close */
void (*initfd) (int); /* clear fd sets */
void (*setfdread) (int); /* set fd in readable fdset */
void (*setfdwrite) (int); /* set fd in writeable fdset */
const char * (*strerror) (int); /* return enhanced error string */
} netmethods_t;
/*)) */
/*(( "Global Variables" */
extern netmethods_t NetAmiTCP; /* in net_amitcp.c */
extern netmethods_t NetAS225; /* in net_as225.c */
/*)) */
#endif /* _NET_H__ */